Skip to content

wp post create: Add JSON input support for tax_input#532

Merged
swissspidy merged 6 commits intowp-cli:mainfrom
caribe:patch-1
Mar 13, 2026
Merged

wp post create: Add JSON input support for tax_input#532
swissspidy merged 6 commits intowp-cli:mainfrom
caribe:patch-1

Conversation

@caribe
Copy link
Contributor

@caribe caribe commented Apr 11, 2025

Fixes this 10 year old issue wp-cli/wp-cli#1323 (closed, but not fixed).

wp post create parameter --tax_input is supposed to be an array, but no JSON parsing is done and therefore is unusable.

Fixes this 10 year old issue wp-cli/wp-cli#1323 (closed, but not fixed).

`wp post create` parameter `--tax_input` is supposed to be an array, but no JSON parsing is done and therefore is unusable.
@caribe caribe requested a review from a team as a code owner April 11, 2025 15:55
@codecov
Copy link

codecov bot commented Apr 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@swissspidy
Copy link
Member

Thanks for opening this PR.

Would you also be up for adding some tests to cover this change? See #133 for inspiration.

@swissspidy
Copy link
Member

swissspidy commented May 6, 2025

I just added a test now, but it fails because tax_input requires the current user (which there technically isn't one with WP-CLI) to have the necessary capabilities. So we need to figure that one out first...

Related: https://github.com/orgs/wp-cli/discussions/6052

@github-actions github-actions bot added bug command:post-create Related to 'post create' command labels Dec 22, 2025
@swissspidy swissspidy added this to the 2.9.0 milestone Mar 13, 2026
@swissspidy swissspidy merged commit 2771a6b into wp-cli:main Mar 13, 2026
69 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug command:post-create Related to 'post create' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants